Skip to content

Update #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 481 commits into from
May 9, 2020
Merged

Update #3

merged 481 commits into from
May 9, 2020

Conversation

sabas1080
Copy link
Member

No description provided.

fpistm and others added 30 commits January 22, 2020 14:07
Fixes #878

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
I2C buffers, as well as some other attributes of the TwoWire class,
should not be static (shared between instances),
otherwise multi instance I2C doesn't work properly.
For example when MCU is master on one instance and slave on the other,
Slave reception under interruption can happen in the middle of master transmission,
and there is conflict on the shared resources.

fixes #699
The CDC code presents itself as a virtual serial port. However, it also
sets the "bFunctionProtocol" value to 1, which means it supports
AT-commands, which is not actually the case. This might cause problems
with some software, such as ModemManager.

Originally, ModemManager would be very liberal with probing serial
devices, using a blacklist to prevent probing non-modems such as
Arduinos.

Since version 1.7.990, it has supported a "strict" mode where it tries to be
more restrained in what devices it probes. For CDC ACM devices, this
means it will only probe devices that claim to support AT-commands.
However, it also stopped applying the blacklist (intending to eventually
remove the blacklist), meaning it would end up probing these serial ports.

This new strict policy is not the upstream default, but is enabled in
Debian (since Buster) and Ubuntu (since bionic 18.04.2). Later versions
of ModemManager make an exception for single-port Serial devices making this
less of a problem, but best to also fix the descriptor.

For the equivalent change in the Arduino AVR core, see:
arduino/ArduinoCore-avr#92
On some configurations, pin number is larger than 63:
Example: NUCLEO_F429ZI PA0 = 103
```
error: call of overloaded 'HardwareSerial(int, int)' is ambiguous`

    1 | HardwareSerial Serialx(0, 1);
      |                                  ^
In file included from cores/arduino/WSerial.h:5,
                 from cores/arduino/wiring.h:47,
                 from cores/arduino/Arduino.h:32,
                 from sketch_jan27b.ino.cpp:1:
cores/arduino/HardwareSerial.h:106:5: note: candidate: 'HardwareSerial::HardwareSerial(void*, bool)'
  106 |     HardwareSerial(void *peripheral, bool halfDuplex = false);
      |     ^~~~~~~~~~~~~~
cores/arduino/HardwareSerial.h:104:5: note: candidate: 'HardwareSerial::HardwareSerial(uint32_t, uint32_t)'
  104 |     HardwareSerial(uint32_t _rx, uint32_t _tx);
      |     ^~~~~~~~~~~~~~
```

When the Rx Pin is 0 then the compiler doesn't know which constructor
to use as 0 can be interpreted like NULL. So both of them are valid:
 HardwareSerial(uint32_t _rx, uint32_t _tx);
 HardwareSerial(void *peripheral, bool halfDuplex = false);

Defining an explicit type avoid this issue.

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Previously, there were a few problems:
 - USB manufacturer string was only configurable when an unknown VID was
   used.
 - USB product string would always include CDC/HID and HS/FS indication,
   it was not possible to specify the full string.
 - USB PID was always hardcoded, depending on the CDC/HID mode. These
   hardcoded PIDs are really only valid within the ST PID, so it made
   now sense that the vid *could* be specified.

This commit cleans this up:
 - Boards must now either specify both the VID and PID, or neither.
 - When boards specify no VID and PID, they use the ST VID with a pid
   based on the CDC or HID mode like before.
 - All boards used to specify the ST vid explicitly in boards.txt, now
   they do not and rely on the default in the code.
 - When no USB_MANUFACTURER_STRING is defined (can be in boards.txt or
   variant.h now), a default is selected based on the VID, or "Unknown"
   is used if the VID is unknown.
 - When no USB_PRODUCT_STRING is defined (can be in boards.txt or
   variant.h now), a default is based on the BOARD_NAME, CDC/HID and
   FS/HS mode.

All included boards should work as before. Third-party board
definitions that use this core should be updated:
 - If build.vid is 0x0483, it should be removed. Otherwise, both vid and
   pid should be specified.
 - If build.usb_manufacturer is specified, it should be replaced by
   adding '-DUSB_MANUFACTURER_STRING="My Company"' to build.extra-flags.
This value should probably be configurable by the sketch, so a
meaningful value can be picked. As long is this is not possible, best to
use 0, rather than 2.0, otherwise it later becomes impossible to use 2.0
in a meaningful way (you'll never know if the device is really 2.0, or
an old version that had no meaningful version number).
Fixes #899

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Included in STM32CubeL4 FW V1.15.0

Note: Trailing spaces have been cleaned.

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Included in STM32CubeL4 FW V1.15.0

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Included in STM32CubeH7 FW V1.6.0

Note: Trailing spaces have been cleaned.

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Included in STM32CubeH7 FW V1.6.0

Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Base on system_stm32h7xx_singlecore.c

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
With introduction of 'I2C multi instances: Remove static qualifier on TwoWire attributes'
parameters 'inBytes' and 'numBytes' become useless as they are part of new obj structure parameter.
Included in STM32CubeMP1 FW V1.1.1

Fix TIM Break Source definition was already applied
in the previous update. That's why no source change
is displayed. Anyway update the Release Note and version.

Note: dos2unix applied on all files
Included in STM32CubeMP1 FW V1.1.1

Align Header file with TIM driver ( Break Source definition)
was already applied in the previous update.

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Included in STM32CubeWB FW V1.4.0

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
fpistm and others added 29 commits April 29, 2020 16:38
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Co-authored-by: Frederic Pillon <frederic.pillon@st.com>
* Added STM32F072CB varant for the Elektor LoRa Node

As the STM32F072C8 ( 64kB ) does not provide enough space for user applications when the LoRaWAN Stack is present, the first production run will include a STM32F072CB (128kB) with the same pinout but a bit more flash. 
The variant has been renamed to reflect this change, also a new Board has been added to the menu so you can choose what you have populated.

Signed-off-by: Mathias Claussen | Elektor Labs <mathiasc@eimworld.com>
Co-authored-by: Frederic Pillon <frederic.pillon@st.com>
This reverts commit 8d062a5.
Included in STM32CubeG4 FW v1.2.0

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Included in STM32CubeG4 FW v1.2.0

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Guard have been removed while they should not.

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Update to latest STM32CubeG4
…pdate

New hardening has been implemented in Timer HAL (starting with G4):
The new Channel state implementation prevent to restart a channel,
if the channel has not been explicitly be stopped with HAL interface.
Channel state is forced ready when pause() or pauseChannel() is called.
PR: HardwareTimer: Allow setting preload enable bits #900
introduced a regression in servo library.
Included in STM32CubeWB FW v1.5.0

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Included in STM32CubeWB FW v1.5.0

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Update to latest STM32CubeWB
Included in STM32CubeL4 FW v1.15.1

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Included in STM32CubeL4 FW v1.15.1

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Update to latest STM32CubeL4
Included in STM32CubeF2 FW v1.9.0

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Included in STM32CubeF2 FW v1.9.0

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Update to latest STM32CubeF2
Included in STM32CubeH7 FW v1.7.0

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Included in STM32CubeH7 FW v1.7.0

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
Update to latest STM32CubeH7
@sabas1080 sabas1080 merged commit 4f4ca11 into ElectronicCats:master May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.